<include file="public:header" />
<!--商品列表-->
<div class="pad_lr_10" >
    <if condition="$sm eq 'image'">
    <div class="J_tablelist item_imglist clearfix">
        <volist name="list" id="val">
        <div class="item fl">
            <label>
            <input type="checkbox" class="J_checkitem check" value="{$val.id}" />
            <div class="img clearfix"><img src="{$val.img}"></div>
            </label>
            <span class="line_x">{$val.title}</span>
            <ul>
                <li><a class="J_tooltip btn_blue" title="{$cate_list[$val['cate_id']]}">{:L('cate')}</a></li>
                <li><a class="J_tooltip btn_blue" title="{$val.uname|default=L('item_no_author')}">{:L('author')}</a></li>
            </ul>
        </div>
        </volist>
    </div>
    <else/>
    <div class="J_tablelist table_list" data-acturi="{:U('item/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th><span>ID</span></th>
                <th><span>排序</span></th>
                <th width="40">&nbsp;</th>
                <th align="left"><span>商品名称</span></th>
                <th align="left"><span>副标题</span></th>
                <th width="140"><span>分类</span></th>
               
                <th width="70"><span>价格(元)</span></th>
				
                <th width="70"><span>是否上架</span></th>
                <th width="120"><span>发布时间</span></th>
                <th width="80">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.id}</td>
                <td align="center">{$val.orderby}</td>
                <td align="right">
                    <notempty name="val['img']"><div class="img_border"><img src="{$val.img}" width="32" width="32" class="J_preview" data-bimg="{$val.img}"></div></notempty>
                </td>
                <td align="left">{$val.title}</td>
                <td align="left">{$val.fbt}</td>
                <td align="center">
                    <?php
                    $sub = $cate_list[$val['cid']];
                    echo $cate_list[$sub['pid']]['name'];
                ?>
                </td>
                <td align="center" class="red">{$val.price}</td>
				
                <td align="center"><img data-tdtype="toggle" data-id="{$val.id}" data-field="status" data-value="{$val.status}" src="__STATIC__/images/admin/toggle_<if condition="$val.status eq 0">disabled<else/>enabled</if>.gif" /></td>
                <td align="center">{$val.add_time|date='Y-m-d H:i:s',###}</td>
                <td align="center"><a href="{:u('item/edit', array('id'=>$val['id'], 'menuid'=>$menuid))}">{:L('edit')}</a> | <a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('item/delete', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['title'])}">{:L('delete')}</a></td>
            </tr>
            </volist>
    	</tbody>
    </table>
    </div>
    </if>
    <div class="btn_wrap_fixed">
        <label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('item/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
        <div id="pages">{$page}</div>
    </div>
</div>
<include file="public:footer" />
<link rel="stylesheet" href="__STATIC__/js/calendar/calendar-blue.css"/>
<script src="__STATIC__/js/calendar/calendar.js"></script>
<script>
$('.J_preview').preview(); //查看大图
$('.J_cate_select').cate_select({top_option:lang.all}); //分类联动
$('.J_tooltip[title]').tooltip({offset:[10, 2], effect:'slide'}).dynamic({bottom:{direction:'down', bounce:true}});
</script>
</body>
</html>